-- GENERATED SPELL FOR [Dark Iron Rifleman] --


function spell0_6523(pUnit, Event) --@Gift of Ragnaros,Self--
pUnit:FullCastSpellOnTarget(7891,pUnit)
pUnit:RegisterEvent('Sorts_6523', 554, 1)
end

function spell1_6523(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(8995,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6523', 610, 1)
end

function spell2_6523(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(8996,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6523', 650, 1)
end

function spell3_6523(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(8997,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6523', 639, 1)
end

function spell4_6523(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6523', 562, 1)
end

function Sorts_6523(pUnit, Event)
local choix_sorts_6523 = math.random(0, 4)
if choix_sorts_6523 == 0 then
pUnit:RegisterEvent('spell0_6523', 1, 1)
end
if choix_sorts_6523 == 1 then
pUnit:RegisterEvent('spell1_6523', 1, 1)
end
if choix_sorts_6523 == 2 then
pUnit:RegisterEvent('spell2_6523', 1, 1)
end
if choix_sorts_6523 == 3 then
pUnit:RegisterEvent('spell3_6523', 1, 1)
end
if choix_sorts_6523 == 4 then
pUnit:RegisterEvent('spell4_6523', 1, 1)
end
end

function mob6523_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6523', math.random(1500, 3000), 1)
end

function mob6523_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6523_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6523_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6523, 1, 'mob6523_Action')
RegisterUnitEvent(6523, 2, 'mob6523_Leave')
RegisterUnitEvent(6523, 3, 'mob6523_Kill')
RegisterUnitEvent(6523, 4, 'mob6523_Die')
